package cn.zc.auth.service.config.handler.feignHandler;

import feign.codec.ErrorDecoder;
import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;


/**
 * feign错误调用，配置类，注入我们自己定义的FeignErrorCode类
 */
@Configuration
@Import(FeignClientsConfiguration.class)
public class FeignConfiguration {

    @Bean
    public ErrorDecoder errorDecoder(){
        return new FeignErrorCode();
    }
}
